<?php class Form_BlogdetailForm extends Form_Custom_General {
        public function init() {

		$cmt_id = $this->createElement("hidden", "cmt_id")
                     ->setRequired(FALSE)
                     ->addValidator("NotEmpty", true, array("messages" => array("isEmpty" => "Please enter id")))
                     ->addFilters(array(
                         new Zend_Filter_StringTrim(),
                     ))
                     ->setAttribs(Array("class"=>"span6","placeholder"=>"Id"));
                     $this->addElement($cmt_id);

		$cmt_name = $this->createElement("text", "cmt_name")
                     ->setRequired(TRUE)
                     ->addValidator("NotEmpty", true, array("messages" => array("isEmpty" => "Please enter Name")))
                     ->addFilters(array(
                         new Zend_Filter_StringTrim(),
                     ))
                     ->setAttribs(Array("class"=>"","placeholder"=>""));
                     $this->addElement($cmt_name);

		$cmt_email = $this->createElement("text", "cmt_email")
                     ->setRequired(True)
                     ->addValidator("NotEmpty", true, array("messages" => array("isEmpty" => "Please enter Email-Id")))
                    ->addValidator(new Zend_Validate_EmailAddress()) 
                    ->addFilters(array(
                         new Zend_Filter_StringTrim(),
                     ))
                     ->setAttribs(Array("class"=>"","placeholder"=>""));
            $cmt_email->getValidator('emailAddress')->setMessage("Email address is not valid.", Zend_Validate_EmailAddress::INVALID_FORMAT);
        
            $this->addElement($cmt_email);
			
			$cmt_note = $this->createElement("textarea", "cmt_note")
                     ->setRequired(TRUE)
                     ->addValidator("NotEmpty", true, array("messages" => array("isEmpty" => "Please enter Comment")))
                     ->addFilters(array(
                         new Zend_Filter_StringTrim(),
                     ))
                     ->setAttribs(Array("class"=>"","rows"=>"3","placeholder"=>""));
                     $this->addElement($cmt_note);

		    $cmt_send = $this->createElement("checkbox", "cmt_send")
                    //->setRequired(FALSE)
                     ->addValidator("NotEmpty", true, array("messages" => array("isEmpty" => "Please check the checkbox")))
                     ->addFilters(array(
                         new Zend_Filter_StringTrim(),
                     ))
                     ->setAttribs(Array("class"=>"","placeholder"=>""));
                     $this->addElement($cmt_send);

					 
			/*$ctc_contactnumber = $this->createElement("text", "ctc_contactnumber")
                     //->setRequired(TRUE)
                     ->addValidator("NotEmpty", true, array("messages" => array("isEmpty" => "Please enter contactnumber")))
                     ->addFilters(array(
                         new Zend_Filter_StringTrim(),
                     ))
                     ->setAttribs(Array("class"=>"form-control","placeholder"=>"Contact Number"));
                     $this->addElement($ctc_contactnumber);*/
					 
			$cmt_createddate = $this->createElement("hidden", "cmt_createddate")
                     ->setRequired(FALSE)
                     ->addValidator("NotEmpty", true, array("messages" => array("isEmpty" => "Please enter create date")))
                     ->addFilters(array(
                         new Zend_Filter_StringTrim(),
                     ))
                     ->setAttribs(Array("class"=>"span6","placeholder"=>"Create Date"));
                     $this->addElement($cmt_createddate);

			
		$submit = $this->createElement("submit", "submit")
                ->setLabel('Send message')
				->setAttribs(Array("title" => "Save changes", "class"=>"button"));
        $this->addElement($submit);


        /*$reset = $this->createElement("reset", "Reset")
                ->setAttribs(Array("title" => "Save changes and continue to edit", "class"=>"btn-glow primary"));
        $this->addElement($reset); */  }
        }?>